﻿@model TaxTypeSelectorModel
@using Nop.Core.Domain.Tax
@inject Nop.Core.IWebHelper webHelper

@{
    var returnUrl = webHelper.GetRawUrl(Context.Request);

    var taxTypes = new List<SelectListItem>();
    taxTypes.Add(new SelectListItem
    {
        Text = T("Tax.Inclusive").Text,
        Value = Url.RouteUrl("ChangeTaxType", new { customertaxtype = ((int)TaxDisplayType.IncludingTax), returnUrl }, webHelper.CurrentRequestProtocol),
        Selected = Model.CurrentTaxType == TaxDisplayType.IncludingTax
    });
    taxTypes.Add(new SelectListItem
    {
        Text = T("Tax.Exclusive").Text,
        Value = Url.RouteUrl("ChangeTaxType", new { customertaxtype = ((int)TaxDisplayType.ExcludingTax), returnUrl }, webHelper.CurrentRequestProtocol),
        Selected = Model.CurrentTaxType == TaxDisplayType.ExcludingTax
    });
}
<div class="tax-display-type-selector">
    <select id="customerTaxType" name="customerTaxType" asp-items="@taxTypes" onchange="setLocation(this.value);" aria-label="@T("Tax.Selector.Label")"></select>
</div>